<template>
  <div class="order_list">
    <el-scrollbar always>
      <div class="content">
        <template v-if="homeState.order.activeorderdata != null && homeState.order.activeorderdata.length > 0">
          <OrderItem
            v-for="(item, index) in homeState.order.activeorderdata"
            :key="item.id"
            :data="item"
            :style="index != 0 ? 'margin-top: 8px;' : ''"
          />
        </template>
        <template v-else>
          <el-empty :image-size="120" :description="languageJson.message.nodata" />
        </template>
      </div>
    </el-scrollbar>
  </div>
</template>

<script setup>
import OrderItem from './OrderItem.vue'
const languageJson = inject('languageJson')
const languageType = inject('languageType')
const { homeStore, homeState } = inject('HomeStore')

</script>

<style lang="scss" scoped>
.order_list {
  height: calc(100% - 34px);
  padding: 12px 0 16px 0;
}
.content {
  width: 100%;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
}
</style>